import request from '@/utils/request'
// 获取地址列表
export function getAddressList(query) {
  return request({
    url: '/house/address/listByPid',
    method: 'get',
    params: query
  })
}

// 获取地址详情
export function getAddressDetail(addressId) {
  return request({
    url: '/house/address/' + addressId,
    method: 'get'
  })
}

// 新增地址
export function addAddress(data) {
  return request({
    url: '/house/address',
    method: 'post',
    data: data
  })
}

// 更新地址
export function updateAddress(data) {
  return request({
    url: '/house/address',
    method: 'put',
    data: data
  })
}

// 删除地址
export function deleteAddress(addressId) {
  return request({
    url: '/house/address/' + addressId,
    method: 'delete'
  })
}
